package com.niit.user_profile_center.entity;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@Table(name = "tb_follow")
public class Follow {
    /*
    关注者id
     */
    @Id
    @Column(name = "follower_id", nullable = false)
    private long followerId;
    /*
    被关注者id
     */
    @Column(name = "following_id", nullable = false)
    private long followingId;
    /*
    关注时间
     */
    @Column(name = "create_date", nullable = false)
    private Date createTime;
    /*
    更新时间
     */
    @Column(name = "update_date", nullable = false,columnDefinition = "DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
    private Date updateTime;
    /*
    是否双向好友(0: 否，1: 是)
     */
    @Column(name = "is_fiend")
    private Integer isFriend;
    /*
    版本号
     */
    @Column(name = "version")
    private Integer version;
    /*
    是否删除(0: 否，1: 是)
     */
    @Column(name = "is_deleted")
    private Integer isDeleted;
    /*
    关注数
     */
    @Transient
    private Integer followerCount;

    @Transient
    private Integer followingCount;
}
